//导入根组件
import Vue from 'vue'
//导入elementUI
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI);

//导入根页面
import login from './login.vue'

import router from './router/index.js'
//阻止 vue 在启动时生成生产提示。
Vue.config.productionTip = false;

//将vue-router集成到项目中
import VueRouter from 'vue-router'
//将VueRouter绑定到Vue对象上
Vue.use(VueRouter);
//导入路由规则对应的组件对象
import student from './components/student.vue'
import company from './components/company.vue'
//定义路由规则
var Router = new VueRouter({
    routes:[
        {
            path:'/',
            redirect:'/student',
        },
        {
            path:'/student',
            component:student
        },
        {
            path:'/company',
            component:company
        }
    ]
});

new Vue({
    el:'#app',
    router:Router,
    components: { login },
    template:'<login></login>'
});